package com.wy2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wy2.entity.RoleModule;



import com.wy2.service.RoleModuleService;

@RestController
@RequestMapping("/roleM")
@CrossOrigin
public class RoleModuleController {

	
	@Autowired
	private RoleModuleService rm;

	/**
	 * 给角色设置管理addRolesByModels
	 */
	@RequestMapping("/addRolesByModels")
	public Object addRolesByModels(String mid, String ids){

		try{

			rm.save(mid, ids);

			return 1;

		}catch (Exception e){

			return -1;
		}
	}

}
